waypoint *
waypt_dupe(const waypoint *wpt)
{
+ /*
+ * This and waypt_free should be closely synced.
+ */
waypoint * tmp;
tmp = waypt_new();
memcpy(tmp, wpt, sizeof(waypoint));
tmp->gc_data.desc_long.utfstring =
xstrdup(tmp->gc_data.desc_long.utfstring);
}
+ if (wpt->gc_data.placer) {
+ tmp->gc_data.placer = xstrdup(wpt->gc_data.placer);
+ }
+
/*
* It's important that this duplicated waypoint not appear
* on the master Q.
void
waypt_free( waypoint *wpt )
{
+ /*
+ * This and waypt_dupe should be closely synced.
+ */
if (wpt->shortname) {
xfree(wpt->shortname);
}